<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>账户信息</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="stylesheet" href="../../plugins/mui/mui.min.css">
    <link rel="stylesheet" type="text/css" href="../../css/my/fund/index.css"/>
    <script src="../../js/statistics.js"></script>
    <script src="../../js/fontset.js"></script>
</head>
<body>
<header class="mui-bar mui-bar-transparent">
    <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
    <h1 class="mui-title">账户信息</h1>
</header>
<div class="mui-content">
	<div class="banner">
		<div class="fund-box">
			<strong class="fund-money"></strong>
			<span class="fund-txt">账户余额</span>
		</div>
	</div>
	<div class="card">
		<div class="card-header"><i class="header-icon"></i>账户信息</div>
		<div class="card-content" id="content">
		</div>
		<div class="mui-content-padded">
			<div class="btn-exit mui-btn mui-btn-block btn-primary">退出登录</div>
		</div>
		
	</div>
</div>
<script type="text/javascript" src="../../plugins/jquery/jquery-3.1.0.min.js"></script>
<script src="../../plugins/mui/mui.min.js"></script>
<!--<script type="text/javascript" src="../plugins/mui/update.js"></script>-->
<script src="../../js/getApiToken.js"></script>
<script src="../../js/md5.js"></script>
<script src="../../plugins/template/template.js" ></script>
<script src="../../js/life_housekeeper/windowTitleView.js"></script>
<script type="text/html" id="contentTpl">
	<div class="card-tab-view">
		<div class="card-cell-item">
			<div class="mui-table">
				<div class="mui-col-xs-5 mui-table-cell"><span class="item-tit">公积金账户</span></div>
				<div class="mui-col-xs-7 mui-table-cell mui-text-right"><span>{{spcode}}</span></div>
			</div>
		</div>
		<div class="card-cell-item">
			<div class="mui-table">
				<div class="mui-col-xs-5 mui-table-cell"><span class="item-tit">单位代码</span></div>
				<div class="mui-col-xs-7 mui-table-cell mui-text-right"><span>{{sncode}}</span></div>
			</div>	
		</div>
		<div class="card-cell-item">
			<div class="mui-table">
				<div class="mui-col-xs-5 mui-table-cell"><span class="item-tit">单位名称</span></div>
				<div class="mui-col-xs-7 mui-text-right mui-ellipsis-2 mui-table-cell"><span>{{snname}}</span></div>
			</div>
			
		</div>
		<div class="card-cell-item">
			<div class="mui-table">
				<div class="mui-col-xs-5 mui-table-cell"><span class="item-tit">职工姓名</span></div>
				<div class="mui-col-xs-7 mui-table-cell mui-text-right"><span >{{spname}}</span></div>
			</div>
		</div>
		<div class="card-cell-item">
			<div class="mui-table">
				<div class="mui-col-xs-5 mui-table-cell"><span class="item-tit">证件号码</span></div>
				<div class="mui-col-xs-7 mui-table-cell mui-text-right"><span >{{spidno}}</span></div>
			</div>
		</div>
		<div class="card-cell-item">
			<div class="mui-table">
				<div class="mui-col-xs-5 mui-table-cell"><span class="item-tit">联系电话</span></div>
				<div class="mui-table-cell mui-text-right flex">
					<span >{{sptel}}</span>
					{{if sptel2}}
					<span >{{sptel2}}</span>
					{{/if}}
				</div>
			</div>
		</div>
		<div class="card-cell-item">
			<div class="mui-table">
				<div class="mui-col-xs-5 mui-table-cell"><span class="item-tit">联系地址</span></div>
				<div class="mui-col-xs-7 mui-table-cell mui-text-right"><span >{{splxdz}}</span></div>
			</div>
		</div>
	</div>
</script>
<script type="text/javascript">
	mui.init();
	mui.plusReady(function(){
		var self = plus.webview.currentWebview(),
		    info = self.info,
			content = document.getElementById("content"),
			contentTpl = document.getElementById("contentTpl"),
			fundLogin = null,
			contentHtml = template('contentTpl',info);
			content.innerHTML = contentHtml;
			document.querySelectorAll('.fund-money')[0].innerHTML = info.spmend;
		mui('.mui-content').on('tap','.btn-exit',function(e){
			var userId = plus.storage.getItem('cg_user_id');	
			plus.nativeUI.showWaiting('');
			myAjax('home/provident/unbind','post',{
				userId:userId
			},function(e){
				plus.nativeUI.closeWaiting();
				if(e.code == 0){
					plus.storage.removeItem('spcode');
				if(self){
					var parent =self.opener();
					parent.close();
					self.close();
				}
				var viewOptions = {
					url:'fund-login.html',
					id:'fund-login'
				},
				extras ={
				},
				titleOptions = {
					backImg:'whiteBack'
				};
				addTitleView(viewOptions,extras,titleOptions);
				
				}else{
					mui.toast('退出失败，请重试！');
				}
			})
		})	
		
	})

</script>
</body>
</html>
